
capture program drop expint
program define expint, eclass
	args dv ivd beta
	if `"`beta'"'!=""{
	qui sum `dv' if e(sample)
	local ysd=`r(sd)'
	
	qui sum `ivd' if e(sample)
	local xsd=`r(sd)'
	
	local notice  `" "Standardized Coefficients" "'
	}
	else{
	local ysd=1 	
	local xsd=1

	local notice  `" "Original Coefficients" "'

	}

qui: nlcom (primary:(_b[`ivd'])*`xsd'/`ysd') ///
	(secondary:(_b[`ivd']+_b[2.edu#c.`ivd'])*`xsd'/`ysd') ///
	(tertiary:(_b[`ivd']+_b[3.edu#c.`ivd'])*`xsd'/`ysd'), post
	
	
ereturn display
di `notice'

end
